//package ca.cbc.msb.mq;
//
//import java.util.HashMap;
//import java.util.Map;
//
//import javax.jms.JMSException;
//import javax.naming.NamingException;
//
//import org.junit.Before;
//import org.junit.Test;
//
//import ca.cbc.msb.shared.MSBMessage;
//import ca.cbc.msb.shared.entity.MSBNotification;
//import ca.cbc.msb.enums.QueueEnum;
//
//public class MessageConsumerImpl_changeMedia_Test_old {
//
//	MessageConsumerImpl changeMediaConsumer ;//= new MessageConsumerImpl(QueueEnum.NewReleaseQueue);
////	MessageConsumerImpl verificationConsumer ;//= new MessageConsumerImpl(QueueEnum.YospaceVerificationQueue);
//	MessageUtilImpl notificationSender ;//= new MessageUtilImpl();
//	MSBMessage message;
//	MSBNotification notification;
//
//	@Test
//	public void testRun() {
//		
////		new Thread(verificationConsumer).start();
//		//new Thread(changeMediaConsumer).start();
//		changeMediaConsumer.start();
//		try {
//			notificationSender.submitMessage(QueueEnum.NewReleaseQueue, message);
//		} catch (NamingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (JMSException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}finally{
//			notificationSender.disconnect();
//		
//		}
//		try {
//			Thread.sleep(1*30000);
//		} catch (InterruptedException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}finally{
//			changeMediaConsumer.stop();
//		}
//		assert(true);//fail("Not yet implemented");
//	}
//
//	@Before
//	public void setup() throws NamingException, JMSException
//	{
//		//build up parameters
//		// build a message, media, 
//		// send a new release notification msg to queue
//		//build a runnable newrelease thread
//		//build a videoverification, runnable
//		
//		
//		message = new MSBMessage();
//		MSBMedia media = new MSBMedia();
//		media.setContentTitle("TestAddMedia--Montreal Firebombing");
//		media.setContentBody("Lynn Robson is covering the latest Molotov cocktail firebomb in Montreal");
//		
//		Map<String, String> metadataMap = new HashMap<String, String>();
//		metadataMap.put("keywords", "testAddMediaToGSA, thecurrentshift, january, elders, adult children, Filial Responsibility, china law, family law");
//		metadataMap.put("description", "China is considering a law that would force children to visit their elderly parents. And here in Canada, nearly every province has a law on the books allowing parents to sue their children for financial support. Meet a daughter who is being sued by her mother.");
//		metadataMap.put("thumbnailURL", "http://thumbnails.cbc.ca/maven_legacy/thumbnails/TheCurrent-220x124.jpg");
//		metadataMap.put("playerURL", "http://release.theplatform.com/content.select?pid=OFqo1YkmsCPCLJVdoa1AW7d7NYf1uM6g&amp;UserName=Unknown&amp;Portal=All%20Content");
//		metadataMap.put("Show", "The Current");
//		metadataMap.put("Account", "Radio");
//		metadataMap.put("AudioVideo", "Video");
//		metadataMap.put("LiveOnDemand", "On-Demand");
//		metadataMap.put("Genre", "Other");
//		metadataMap.put("runtime", "00:31:37");
//		metadataMap.put("airdate", "2011-01-17T13:13:00-08:00");
//			
//		media.setMetadataMap(metadataMap);
//		media.setMediaId("666666");		
//		MSBRelease release = new MSBRelease();
//		release.setReleaseURL("http://www.qa.nm.cbc.ca/video/watch/hows/More Shows/Radio/A Conversation with Rush/ID=1445449710");
//		//release.setDelivery("Download");
//		release.setDelivery("Streaming");
//		message.setMedia(media);
//		message.setRelease(release);	
//		
//		 changeMediaConsumer = new MessageConsumerImpl(QueueEnum.ChangeMediaQueue);
////		 verificationConsumer = new MessageConsumerImpl(QueueEnum.YospaceVerificationQueue);
//		 notificationSender = new MessageUtilImpl();
//		 notification = new MSBNotification();
//		 notification.setMediaId("11111");
//		 notification.setReleaseId("22222");
//		 
//		
//	}
//}
